<div
  class="sidebar"
  data-color="purple"
  data-background-color="white"
  data-image="/static/assets/img/sidebar-1.jpg"
>
  <div class="logo">
    <a target="_blank" class="simple-text logo-normal"> 模型训练平台 </a>
  </div>
  <div class="sidebar-wrapper">
    <ul class="nav">
      {% if request.user.is_authenticated %}
      <li class="nav-item {% if 'user_info' in segment %} active {% endif %}">
        <a class="nav-link" href="/user_info">
          <p>用户信息</p>
        </a>
      </li>
      <li class="nav-item {% if 'history' in segment %} active {% endif %}">
        <a class="nav-link" href="/history">
          <p>历史工单</p>
        </a>
      </li>
      <li class="nav-item {% if 'new_task' in segment %} active {% endif %}">
        <a class="nav-link" href="/new_task">
          <p>新建工单</p>
        </a>
      </li>

      <li class="nav-item">
        <a class="nav-link" href="{% url 'logout' %}">
          <p>退出登录</p>
        </a>
      </li>

      {% else %} {% endif %}
    </ul>
  </div>
</div>
